package name.jiaosha.air.company.service;

import java.util.List;

import name.jiaosha.air.company.domain.Bug;
import name.jiaosha.air.company.domain.CarInfo;
import name.jiaosha.air.company.domain.Company;
import name.jiaosha.air.company.domain.Department;
import name.jiaosha.air.company.domain.Employee;
import name.jiaosha.air.company.domain.ExpenseItem;
import name.jiaosha.air.company.domain.Partner;
import name.jiaosha.air.company.domain.Storage;

import com.ali8ba.common.PageInfo;

public interface ICompanyService {

	/**
	 * 根据主键查询公司信息
	 * 
	 * @param id
	 * @return
	 */
	public Company getCompanyById(int id);

	/**
	 * 创建公司信息
	 * 
	 * @param company
	 */
	public void createCompany(Company company);

	/**
	 * 根据主键查询车辆信息
	 * 
	 * @param id
	 * @return
	 */
	public CarInfo getCarInfoById(int id);

	/**
	 * 创建车辆信息
	 * 
	 * @param carInfo
	 */
	public void createCarInfo(CarInfo carInfo);

	/**
	 * 根据公司ID查询车辆信息
	 * 
	 * @param comId
	 * @return
	 */
	public PageInfo<CarInfo> getCarListByComId(Integer comId, int index,
			int pageSize);

	/**
	 * 更新车辆信息
	 * 
	 * @param carInfo
	 */
	public void updateCarInfo(CarInfo carInfo);

	/**
	 * 
	 * @param comId
	 * @return
	 */
	public PageInfo<Department> getDepartmentByComId(Integer comId, int index,
			int pageSize);

	/**
	 * 
	 * @param id
	 * @return
	 */
	public Department getDepartmentById(Integer id);

	/**
	 * 更新部门
	 * 
	 * @param department
	 */
	public void updateDepartment(Department department);

	/**
	 * 增加部门
	 * 
	 * @param department
	 */
	public void createDepartment(Department department);

	/**
	 * 增加员工
	 * 
	 * @param employee
	 */
	public void createEmployee(Employee employee);

	/**
	 * 得到对应公司的员工列表
	 * 
	 * @param comId
	 * @return
	 */
	public List<Employee> getEmployeeByComId(Integer comId);

	public Employee getEmployeeById(int id);

	/**
	 * 更新员工
	 * 
	 * @param employee
	 */
	public void updateEmployee(Employee employee);

	/**
	 * 得到对应公司的仓库
	 * 
	 * @param comId
	 * @return
	 */
	public PageInfo<Storage> getStorageByComId(Integer comId, int index,
			int pageSize);

	public Storage getStorageById(Integer id);

	public void createStorage(Storage storage);

	public void updateStorage(Storage storage);

	/**
	 * 增加费用项目
	 * 
	 * @param item
	 */
	public void createExpenseItem(ExpenseItem item);

	public void updateExpenseItem(ExpenseItem item);

	public ExpenseItem getExpenseItemById(Integer id);

	public PageInfo<ExpenseItem> getExpenseItemByComId(Integer comId,
			int index, int pageSize);

	/**
	 * 增加故障列表
	 * 
	 * @param bug
	 */
	public void createBug(Bug bug);

	public void updateBug(Bug bug);

	public Bug getBugById(Integer id);

	public PageInfo<Bug> getBugListByComId(Integer comId, int index,
			int pageSize);

	/**
	 * 增加销售单位
	 * 
	 * @param partner
	 */
	public void createPartner(Partner partner);

	public void updatePartner(Partner partner);

	public Partner getPartnerById(Integer id);

	public PageInfo<Partner> getPartnerListByComId(Integer comId, int index,
			int pageSize);

}
